package day15;


public class ObjectTest {
	public static void main(String[] args) {
		Order order=new Order();
		//获取当前类的类名 及 当前类的父类的类名
		//System.out.print(order.getClass().getSuperclass());
		Order order2=new Order();
		Order order3=order;
		
		System.out.println(order.equals(order2));
		System.out.println(order3.equals(order3));//地址相同是才是相等的
		
		System.out.println(order.toString());
		
	}
}

class Order{
	protected String nameString;
	protected int age;
	
	public void eat() {
		System.out.println("order测试");
	}
}
